#include"Sort.h"

void TestBubbleSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	BubbleSort(a, sizeof(a) / sizeof(int));
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestInsertSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	InsertSort(a, sizeof(a) / sizeof(int));
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestSelectSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	SelectSort(a, sizeof(a) / sizeof(int));
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestShellSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	ShellSort(a, sizeof(a) / sizeof(int));
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestHeapSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	HeapSort(a, sizeof(a) / sizeof(int));
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestQuickSort()
{
	int a[] = { 4,7,9,5,3,6,1,0,2,8 };
	PrintArrary(a, sizeof(a) / sizeof(int));
	//QuickSort1(a, 0, sizeof(a) / sizeof(int) - 1);
	QuickSortNonR(a, 0, sizeof(a) / sizeof(int) - 1);
	PrintArrary(a, sizeof(a) / sizeof(int));
	printf("\n");
}


int main()
{

	//TestBubbleSort();
	//TestInsertSort();
	TestShellSort();
	//TestSelectSort();
	//TestHeapSort();
	//TestQuickSort();

	return 0;
}